package com.tping.jvm;

import java.lang.reflect.Constructor;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;

public class JVMTest {

    public static void main(String[] args){

        int[] array = new int[1024 * 10];

//        try {
//            System.gc();
//            Thread.sleep(100000);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }


        HashMap<String ,String> hashMap = new HashMap<String, String>(20);

        hashMap.put("1", "2");

        hashMap.get("1");

        hashMap.remove("1");

        System.out.println(hashMap.size());


        Map<String, String> concurrentHashMap = new ConcurrentHashMap<String, String>();

        concurrentHashMap.put("2", "4");

        concurrentHashMap.get("2");

        concurrentHashMap.remove("2");


    }
}
